package com.zpark.it.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * @Title: Address
 * @Author Charles
 * @Package com.zpark.it.pojo
 * @Date 2023/7/20 16:08
 */
@Data
@TableName("address")
public class Address implements Serializable {
    public static final Long serialVersionUID = 1L;


    @TableId(type = IdType.AUTO) //主键自增
    private Integer id;
    @NotBlank
    private String linkman;
    @NotBlank
    private String phone;
    @NotBlank
    private String address;

    @TableField("user_id")  //这个注解是数据库字段和实体类属性进行映射
    private Integer userId;
}
